package com.cf.game.message;

import com.cf.game.message.vo.UserInfo;
import com.cf.game.service.constants.EnumReturnCode;
import com.cf.serialize.SmallRoomResponse;

/**
 * game-server-GameStartResponse
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/5/8 上午 10:05
 */
public class GameStartResponse extends SmallRoomResponse {

    public static Integer type = EnumMessageType.GameStartResponse.getType();

    /**
     * 房间号
     */
    private String roomNum;

    /**
     * 自己
     */
    private UserInfo self;

    /**
     * 敌人
     */
    private UserInfo enemy;

    public GameStartResponse(String roomNum, UserInfo self, UserInfo enemy, Integer left, Integer total) {
        super("", EnumReturnCode.SUCCESS.getCode());
        this.roomNum = roomNum;
        this.self = self;
        this.enemy = enemy;
        this.setLeftTime(left);
        this.setGameTime(total);
    }

    public GameStartResponse(String msg, Integer code) {
        super(msg, code);
    }

    @Override
    public Integer messageType() {
        return type;
    }

    public String getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(String roomNum) {
        this.roomNum = roomNum;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        GameStartResponse.type = type;
    }

    public UserInfo getSelf() {
        return self;
    }

    public void setSelf(UserInfo self) {
        this.self = self;
    }

    public UserInfo getEnemy() {
        return enemy;
    }

    public void setEnemy(UserInfo enemy) {
        this.enemy = enemy;
    }
}
